package qianlong.practice.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import qianlong.practice.dao.UserDao;
import qianlong.practice.entity.User;
import qianlong.practice.service.UserService;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public int insert(User user) {
        return userDao.insert(user);
    }

    @Override
    public int update(User user) {
        return userDao.update(user);
    }

    @Override
    public int delete(Integer id) {
        return userDao.delete(id);
    }

    @Override
    public User getOne(Integer id) {
        return userDao.getOne(id);
    }

    @Override
    public List<User> getList(User user) {
        return userDao.getList(user);
    }

    @Override
    public int getCount(User user) {
        return userDao.getCount(user);
    }

    @Override
    public List<User> getPage(User user) {
        return userDao.getPage(user);
    }

}
